# pragma once

# include "cpp_tools.h"

struct cartesian_out
{
    double d_x;
    double d_y;
    double d_varphi;
};
cartesian_out cartesian_dynamic(double v, double beta, double omega, double varphi)
{
    double v_x = v*std::cos(beta);
    double v_y = v*std::sin(beta);
    double d_x = v_x*std::cos(varphi) - v_y*std::sin(varphi);
    double d_y = v_x*std::sin(varphi) + v_y*std::cos(varphi);
    double d_varphi = omega;

    return {d_x,d_y,d_varphi};
}
